home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / develop / libsrc11.arc / ERBYTEE.S < prev    next >
Text File  |  1989-04-27  |  3KB  |  130 lines

  1. * -- line 0 ""
  2. * # 1 "erbytee.c"
  3.     file    "erbytee.c"
  4.     dsct
  5. * # 1 "/wrk/hc11/usr/include/hc11/io.h"
  6. * typedef union    {
  7. * unsigned    STATDATA;    
  8. * unsigned short    STAT_DATA[2];    
  9. * }    serial_word;
  10. * -- line 20 "/wrk/hc11/usr/include/hc11/io.h"
  11. * extern unsigned short *EEPROM;        
  12. * typedef struct    {
  13. * unsigned short    PORTA;        
  14. * unsigned short    Reserve;    
  15. * -- line 40 "/wrk/hc11/usr/include/hc11/io.h"
  16. * unsigned short    PIOC;        
  17. * unsigned short    PORTC;        
  18. * unsigned short    PORTB;        
  19. * unsigned short    PORTCL;        
  20. * unsigned short    Reserve1;    
  21. * unsigned short    DDRC;        
  22. * unsigned short    PORTD;        
  23. * unsigned short    DDRD;        
  24. * unsigned short    PORTE;        
  25. * unsigned short    CFORC;        
  26. * unsigned short    OC1M;        
  27. * unsigned short    OC1D;        
  28. * int        TCNT;        
  29. * int        TIC1;        
  30. * int        TIC2;        
  31. * -- line 60 "/wrk/hc11/usr/include/hc11/io.h"
  32. * int        TIC3;        
  33. * int        TOC1;        
  34. * int        TOC2;        
  35. * int        TOC3;        
  36. * int        TOC4;        
  37. * int        TOC5;        
  38. * unsigned short    TCTL1;        
  39. * unsigned short    TCTL2;        
  40. * unsigned short    TMSK1;        
  41. * unsigned short    TFLG1;        
  42. * unsigned short    TMSK2;        
  43. * unsigned short    TFLG2;        
  44. * unsigned short    PACTL;        
  45. * unsigned short    PACNT;        
  46. * -- line 80 "/wrk/hc11/usr/include/hc11/io.h"
  47. * unsigned short    SPCR;        
  48. * serial_word    SPSRDAT;    
  49. * unsigned short    BAUD;        
  50. * unsigned short    SCCR1;        
  51. * unsigned short    SCCR2;        
  52. * serial_word    SCSRDAT;    
  53. * -- line 100 "/wrk/hc11/usr/include/hc11/io.h"
  54. * unsigned short    ADCTL;        
  55. * unsigned short    ADR[4];        
  56. * unsigned short    Rsrv[4];    
  57. * unsigned short    OPTION;        
  58. * unsigned short    COPRST;        
  59. * unsigned short    PPROG;        
  60. * -- line 120 "/wrk/hc11/usr/include/hc11/io.h"
  61. * unsigned short    HPRIO;        
  62. * unsigned short    INIT;        
  63. * unsigned short    TEST1;        
  64. * unsigned short    CONFIG;        
  65. * }    HCIO;    
  66. * extern HCIO HC11 ;
  67. * # 19 "erbytee.c"
  68. * -- line 20 "erbytee.c"
  69. * # 1 "/wrk/hc11/usr/include/hc11/config.h"
  70. * -- line 20 "/wrk/hc11/usr/include/hc11/config.h"
  71. * -- line 40 "/wrk/hc11/usr/include/hc11/config.h"
  72. * -- line 60 "/wrk/hc11/usr/include/hc11/config.h"
  73. * -- line 80 "/wrk/hc11/usr/include/hc11/config.h"
  74. * # 20 "erbytee.c"
  75. * -- line 20 "erbytee.c"
  76. * # 1 "/wrk/hc11/usr/include/hc11/directives.h"
  77. * -- line 20 "/wrk/hc11/usr/include/hc11/directives.h"
  78. * # 21 "erbytee.c"
  79. * asm("*# small");
  80. *# small
  81. * void erbytee(addr)
  82. * int    addr;        
  83. * {
  84.     psct
  85.     xdef    erbytee
  86. erbytee:
  87.     pshb
  88.     psha
  89.     pshx
  90.     tsx
  91.     xgdx
  92.     subd    #F%1
  93.     xgdx
  94.     txs
  95. * HC11.PPROG = 2 | 4 | 0x10;
  96.     ldab    #22
  97.     stab    HC11+59
  98. * EEPROM[addr&(512-1)] = 0;
  99.     ldd    2+F%1,%x
  100.     anda    #511!.$ff00!>8
  101.     andb    #511!.$00ff
  102.     addd    EEPROM 
  103.     xgdy
  104.     clr    0,%y
  105. * HC11.PPROG = 2 | 4 | 1 | 0x10;
  106.     ldab    #23
  107.     stab    HC11+59
  108. * delay (10);    
  109.     ldd    #10
  110.     jsr    delay
  111. * HC11.PPROG = 2 | 4 | 0x10;
  112.     ldab    #22
  113.     stab    HC11+59
  114. * HC11.PPROG = 0;    
  115.     clr    HC11+59
  116. * -- line 40 "erbytee.c"
  117. * }    
  118. L%14:
  119.     xgdx
  120.     addd    #F%1
  121.     xgdx
  122.     txs
  123.     pulx
  124.     ins
  125.     ins
  126.     rts
  127. F%1:    set    0
  128.     dsct
  129.     end
  130.